import React, { Component } from "react";
import { Modal } from "antd-mobile";
import "./index.scss";

export default class BackModal extends Component {
	constructor(props) {
		super(props);
	}
	onClick = booleanValue => {
		this.props.onClick(booleanValue);
	};
	render() {
		const { isVisible } = this.props;
		return (
			<Modal
				className="turnout-back-modal"
				maskClosable={false}
				transparent
				visible={isVisible}
			>
				<div className="xhb_home_back">
					<div className="buttons">
						<button className="orange" onClick={() => this.onClick(true)}>
							我再想想
						</button>
						<button className="empty" onClick={() => this.onClick(false)}>
							仍然转出
						</button>
					</div>
				</div>
			</Modal>
		);
	}
}
